package com.yanqu.road.server.cmd.activity.springunionbanquet;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.SpringUnionBanquetProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.activity.springunionbanquet.CrossSpringUnionBanquetActivity;
import com.yanqu.road.server.manager.activity.springunionbanquet.CrossSpringUnionBanquetActivityMgr;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.C_SPRING_UNION_BANQUET_DETAIL, desc = "获取宴饮详情")
public class CrossSpringUnionBanquetDetailCmd extends CrossCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        SpringUnionBanquetProto.CrossSpringUnionBanquetDetailReqMsg reqMsg = SpringUnionBanquetProto.CrossSpringUnionBanquetDetailReqMsg.parseFrom(packet.getBytes());
        int activityId = reqMsg.getActivityId();
        long banquetId = reqMsg.getBanquetId();
        CrossSpringUnionBanquetActivity activity = CrossSpringUnionBanquetActivityMgr.getActivity(activityId);
        if(activity != null){
            activity.getUnionBanquetDetail(serverId, packet.getPlayerId(), banquetId);
        }else {

        }
    }

    @Override
    public void sendData() {

    }
}
